#include <iostream>

#include <forward_list>

#include <list>

#include <vector>

#include "matrix.hpp"

int main(int, char*[])
{
  etl::vector<float, 3> t{ 1.0f, 2.0f, 3.0f };
  
  std::cout << t << std::endl;

  std::cout << (-1.0f * t) << std::endl;

  etl::vector<float, 3> u;

  u = t;

  std::cout << u << std::endl;

  u = 1.0f;

  std::cout << u << std::endl;

  std::cout << t - u << std::endl;

  etl::vector<float, 3> v(t + u);

  std::cout << v << std::endl;

  etl::matrix<float, 3, 3> m(.0f);

  std::cout << m << std::endl;

  m = etl::identity<etl::matrix<float, 3, 3> >();
//m = etl::identity_matrix<float, 3>();

  std::cout << m << std::endl;

  etl::matrix<float, 3, 3> n(5.0f);

  std::cout << n << std::endl;

  etl::matrix<float, 3, 3> o(m * n);

  std::cout << o << std::endl;

  etl::matrix<float, 2, 2> m2{1.0f, 2.0f, 3.0f, 6.0f};
  etl::matrix<float, 2, 2> n2{-2.0f, -2.0f, 1.0f, 1.0f};

  etl::matrix<float, 2, 2> o2(m2 * n2);

  std::cout << "eq: " << bool(o2 == etl::matrix<float, 2, 2>(.0f))
    << std::endl;

  std::cout << o2 << std::endl;

  etl::vector<float, 2> v2{1.f, 1.f};

  etl::vector<float, 2> r2(o2 * v2);

  std::cout << r2 << std::endl;

  std::cout << dot(t, u) << std::endl;

  t = {.0f, 1.0f, .0f};
  u = {.0f, .0f, 1.0f};

  std::cout << bool(t != u) << std::endl;

  etl::vector<float, 3> c(cross(t, u));

  std::cout << c << std::endl;

  std::cout << etl::length(etl::vector<float, 3>{1.f, 1.f, 1.f}) << std::endl;
  std::cout << ::etl::sqrt<0>(3.) << std::endl;

  ::etl::matrix<float, 3, 3> d{::etl::identity_matrix<float, 3>()};

  std::cout << d << std::endl;

  return 0;
}
